class bubblesortClass():
	"""docstring for bubblesort"""
	def __init__(self, array):
		#super(bubblesort, self).__init__()
		self.array = array
		#self.bubbleSort()

	def bubbleSort(self):

		for i in xrange(l
			for j in xrange(0, (i-1)):
				if self.array[j] > self.array[j+1]:
					# > crescente ; < decrescente
					tmp = self.array[j]
					self.array[j] = self.array[j+1]
					self.array[j+1] = tmp

		return self.array
		"""
		for i in range(0,len(self.array)-1,1):
			for j in range(len(self.array)-1,(i+1),-1):
				if self.array[j] < self.array[j-1]:
					tmp = self.array[j]
					self.array[j] = self.array[j-1]
					self.array[j-1] = tmp
		print self.array[0]
		return self.array

		"""

if __name__ == "__main__":
	lista=[16,4,10,14,7,9,3,2,1,8]
	print '** Bubblesort **\nLista Inicial : ', lista
	bubblesortObject = bubblesortClass(lista)
	sortedArray = bubblesortObject.bubbleSort()
	print 'Lista Ordenada: ', sortedArray